Error

Debug Report
Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'scripts' AND ( SELECT 1 FROM sections c5 WHERE c5.section_id ' at line 9
Exception Type: Zend_Db_Statement_Exception
Code: 42000
Filename: Pdo.php
Line: 234
Path: /usr/share/php/Zend/Db/Statement
Trace:
# 0
Filename: Statement.php  
Class: Zend_Db_Statement_Pdo  
Function: _execute  
Type: ->  
Args:  
Line: 320  
Path: /usr/share/php/Zend/Db  

# 1
Filename: Abstract.php  
Class: Zend_Db_Statement  
Function: execute  
Type: ->  
Args:  
Line: 468  
Path: /usr/share/php/Zend/Db/Adapter  

# 2
Filename: Abstract.php  
Class: Zend_Db_Adapter_Abstract  
Function: query  
Type: ->  
Args:  
Line: 238  
Path: /usr/share/php/Zend/Db/Adapter/Pdo  

# 3
Filename: Abstract.php  
Class: Zend_Db_Adapter_Pdo_Abstract  
Function: query  
Type: ->  
Args:  
Line: 706  
Path: /usr/share/php/Zend/Db/Adapter  

# 4
Filename: Core.php  
Class: Zend_Db_Adapter_Abstract  
Function: fetchAll  
Type: ->  
Args:  
Line: 62  
Path: /var/www/tandim.com/ssl/public/webapp/library/Cms  

# 5
Filename: Front.php  
Class: Cms_Core  
Function: getSectionByUri  
Type: ->  
Args:  
Line: 271  
Path: /var/www/tandim.com/ssl/public/webapp/library/Cms  

# 6
Filename: Front.php  
Class: Cms_Front  
Function: configureForSection  
Type: ->  
Args:  
Line: 121  
Path: /var/www/tandim.com/ssl/public/webapp/library/Cms  

# 7
Filename: Dispatcher.php  
Class: Cms_Front  
Function: load  
Type: ->  
Args:  
Line: 19  
Path: /var/www/tandim.com/ssl/public/webapp/library/Cms  

# 8
Filename: Abstract.php  
Class: Cms_Dispatcher  
Function: getDefinitionName  
Type: ->  
Args:  
Line: 287  
Path: /usr/share/php/Jacket/Dispatcher  

# 9
Filename: Abstract.php  
Class: Jacket_Dispatcher_Abstract  
Function: hasDefinitionName  
Type: ->  
Args:  
Line: 88  
Path: /usr/share/php/Jacket/Dispatcher  

# 10
Filename: Front.php  
Class: Jacket_Dispatcher_Abstract  
Function: dispatch  
Type: ->  
Args:  
Line: 241  
Path: /usr/share/php/Jacket  

# 11
Filename: Front.php  
Class: Jacket_Front  
Function: dispatch  
Type: ->  
Args:  
Line: 210  
Path: /usr/share/php/Jacket  

# 12
Filename: bootstrap.php  
Class: Jacket_Front  
Function: run  
Type: ::  
Args:  
Line: 66  
Path: /var/www/tandim.com/ssl/public/webapp  

# 13
Filename: index.php  
Class:  
Function: require_once  
Type:  
Args:  
Line: 2  
Path: /var/www/tandim.com/ssl/public